package org.ljdp.bootstrap.loader;

import java.lang.reflect.InvocationTargetException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;

import org.ljdp.bootstrap.LoaderUtil;

/**
 * 程序启动必须类载入
 * @author hzy
 *
 */
public class BootClassLoader {

	private String currPath;

	public BootClassLoader(String currPath) {
		super();
		this.currPath = currPath;
	}
	
	public void doLoadClass() throws MalformedURLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
		List<URL> urls = LoaderUtil.getAllJarUrls(new String[] {currPath});
		LoaderUtil.addClasses(urls);
	}
}
